﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using yncTech.BusinessObjects;
using System.Data;
using System.Collections;

using yncTech.Common;
using EntitySpaces.Interfaces;

public partial class Admin_FinLend_FinLend002b : AdminBasePage
{
    string ids = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ids"] != null)
        {
            ids = Request.QueryString["ids"].ToString();
        }
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (ids.Length > 0)
        {
            ids = ids.Substring(0, ids.Length - 1);
        }
        string[] idList = ids.Split(',');
        using (esTransactionScope tr = new esTransactionScope())
        {
            for (int j = 0; j < idList.Length; j++)
            {
                FinLend finLend = new FinLend();
                if (finLend.LoadByPrimaryKey(decimal.Parse(idList[j])))
                {
                    finLend.UpdatedDttm =finLend.KeyCeckDate= DateTime.Now;
                    finLend.LendStatus = "LendStatus003";
                    finLend.Checker = drpCheck.SelectedItem.Text;
                    finLend.UpdatedBy =finLend.KeyChecker= LoginUserInfo.CurrentUser.LoginName;
                    finLend.Save();

                }
                

            }
            tr.Complete(); 
        }
        WebHelper.CloseDialog(true);
    }
}